<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<style>
 body{font-family:"微软雅黑";font-size:12px;color:#666666;background-color:#F9F9F6}
 *{ padding: 0; margin: 0;} 
 a{text-decoration:none}
 img{border:0px}
#list{ clear:both; padding:8px 0px; width:100%; text-align:center; font:normal normal normal 11px Verdana,Geneva,Arial,Helvetica,sans-serif;color:#808080}
.g_list:hover{background-color:#FEF9E6;color:#0066CC}
#tdst{border: 1px solid silver; padding-left: 8px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px}
#tdst1{padding-left: 8px;border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px}

.page{height:20px;width:20px;border:1px solid #464646; text-align:center;vertical-align:middle;display:inline-block;color:#0066CC}

#page{border:0;width:100%;height:25px;padding:5px;background-color:#DFDFDF;position:fixed;left:0px;bottom:0px;}
</style>
 <link rel="stylesheet" type="text/css" href="__APP__/statics/css/style.css" />

<script src="__APP__/statics/jquery.1.4.2.js" type="text/javascript"></script>


<div id="content">
		<style>
a{text-decoration:none}
.page2{height:20px;width:20px;border:1px solid #464646; text-align:center;vertical-align:middle;display:inline-block;color:#0066CC}
.page2:hover{background-color:#666666;color:#fff}
.current{height:20px;width:20px;border:1px solid #666666; text-align:center;vertical-align:middle;color:#FFF;font-weight:bold;background:#666666;display:inline-block;}
</style>
<div id="list">
  <table border="0" cellpadding="15" width="100%" style="border-left-width: 1px; border-right-width: 1px; border-top-width: 1px; border-bottom-style: solid; border-bottom-width: 1px; border-collapse:collapse">
  <tr height=30>
		<td id="tdst" width="20">　</td>
		<td id="tdst" width="60">操作</td>
		<td id="tdst" width="100">商品编号</td>
		<td id="tdst" width="80">分类</td>
		<td id="tdst">商品名称</td>
		<td id="tdst" width="60">销售价</td>
		<td id="tdst" width="60">市场价</td>
		<td id="tdst" width="60">库存</td>
		<td id="tdst" width="60">重量</td>
		<td id="tdst" width="30">上架</td>
		<td id="tdst">标签</td>
	</tr>
<?php if(is_array($goods)): $i = 0; $__LIST__ = $goods;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$goods): $mod = ($i % 2 );++$i; if($goods["store"] < 5): ?><tr height=25 align="left" class="g_list" bgcolor="#FF3300" style="color:#fff">
<?php else: ?>
   <tr height=25 align="left" class="g_list"><?php endif; ?>
		<td id="tdst1"><input type="checkbox"></td>
		<td id="tdst1"><a href="__URL__/edit/id/<?php echo ($goods["goods_id"]); ?>" target="_blank">编辑</a>/
		                       <a href="javascript:;" onclick="deletes(<?php echo ($goods["goods_id"]); ?>)">删除</a>
		</td>
		<td id="tdst1"><?php echo ($goods["bn"]); ?></td>
		<td id="tdst1"><?php echo ($goods["cat_name"]); ?></td>
		<td id="tdst1"><a href="<?php echo U('Shop/Goods/item?id='.$goods['goods_id']);?>" target="_blank"><?php echo ($goods["goods_name"]); ?></a></td>
		<td id="tdst1" align="center"><?php echo ($goods["price"]); ?></td>
		<td id="tdst1" align="center"><?php echo ($goods["market_price"]); ?></td>
		<td id="tdst1" align="center"><?php echo ($goods["store"]); ?></td>
		<td id="tdst1" align="center"><?php echo ($goods["weight"]); ?></td>
		<td id="tdst1" align="center"><?php if($goods["is_post"] == 0): ?>是<?php else: ?><font color='red'>否</font><?php endif; ?></td>
		<td id="tdst1" align="center"  width="50">
		<?php switch($goods["goods_label"]): case "hot": ?>热卖<?php break;?>
			<?php case "price": ?>特价<?php break;?>
			<?php case "rec": ?>推荐<?php break; endswitch;?>
		</td>
	</tr><?php endforeach; endif; else: echo "" ;endif; ?>
</table>

</div>
<div class="result page" id="page"><?php echo ($page); ?></div>

<script>
function deletes(t){
    var id=t;
	if(confirm('你确认删除此商品吗？')) {
	    window.location.href="__URL__/remove/?id="+id;
	}
}
</script>
</div>